# 建立一个顺序模型
from keras.models import Sequential

model = Sequential()

# 叠加各层网络
from keras.layers import Dense

model.add(Dense(units=3, activation='sigmoid', input_dim=3))
model.add(Dense(units=1, activation='sigmoid'))

# 查看模型结构
model.summary()

# 通过.compile()配置模型求解过程函数
model.compile(loss='categorical_crossentropy',optimizer='sgd',metrics=['accuracy'])

# 训练模型
# model.fit(x_train, y_train, epochs=10, batch_size=10)